import Toast from '@vant/weapp/toast/toast';
const nav_img_black = 'https://witty6.oss-cn-beijing.aliyuncs.com/demo/64241692603437_.pic.jpg'

Page({
  data: {
    nav_show:true,
    nav_title:'秉华健康-健康数据管家',
    fontColor:'#333333',
    nav_img:nav_img_black,
    showdata: false,
    avatar: '',
    nickname:'sssssssssss',
    sex: '1',
    birthday:  '',
  },
  onLoad(option){
    this.setData({
      avatar:option.headurl,
      nickname:option.headname
    })
  },
  // 输入框方法
  onChange(event) {
    console.log(event.detail);
    this.setData({
      nickname: event.detail
    });
  },
  onChangeradio(event) {
    console.log(event.detail)
    this.setData({
      sex: event.detail,
    });
  },
  afterRead(file) {
    this.setData({
      avatar: file.detail.file.tempFilePath
    });
  },
  show_birthday(){
    console.log("1111111111111")
    this.setData({ showdata: true });
  },
  //  获取日期子组件传值
  pickerdata(event){
    let pickerbirthday = event.detail.birthday
    this.setData({
      birthday:pickerbirthday
    })
  },
  To_home(){
    console.log("11111111111")
    console.log(this.data.avatar)
    console.log(this.data.nickname)
    console.log(this.data.sex)
    console.log(this.data.birthday)
    wx.navigateBack({ url: '../home/home'})
  },
});